<!--<h2>{#PLIGG_Visual_Profile_ModifyProfile#}</h2>-->

{if $savemsg neq ""}<br/><p align=center><span class=error>{$savemsg}</span></p>{/if} 

<fieldset><legend>{#PLIGG_Visual_Profile_ModifyProfile#}</legend>
<p>&nbsp;</p>
{if $user_first_time eq 'true'}
<span style="color:red">您尚未修改系统为您预设的用户名，请<a href="#changeloginname">修改</a>后重新登录</span>	
{/if}
{if $user_first_time neq 'true'}
<p>&nbsp;</p>
{if $UseAvatars neq false}<a href="#setavatar">设置头像</a>&nbsp;&nbsp;{/if}
<a href="#setsite">设置网址</a>&nbsp;&nbsp;
<a href="#setrss">设置订阅(rss)</a>&nbsp;&nbsp;
<a href="#setintro">编写小传</a>&nbsp;&nbsp;
<a href="#setotherinfo">设置其他个性信息</a>&nbsp;&nbsp;
<a href="#changepwd">修改密码</a>&nbsp;&nbsp;
{if $user_first_time eq 'true'}<a href="#changeloginname">修改用户名</a>&nbsp;&nbsp;{/if}{/if}
<a id="setavatar"></a>
	{if $UseAvatars neq false}
		<fieldset {if $user_first_time eq 'true'}style="display:none"{/if}><legend>{#PLIGG_Visual_Profile_UploadAvatar2#}</legend>
			{if $user_avatar_source eq "useruploaded"}
				{* this form can't be inside of another form! *}
				<form method="POST" enctype="multipart/form-data" name="image_upload_form" action="{$form_action}">
					<input type="file" name="image_file" size="20">
					<input type="hidden" name="avatar" value="uploaded"/>
					{$hidden_token_profile_change}
					<input type="submit" value="{#PLIGG_Visual_Profile_AvatarUpload#}" name="action" class="log2"><br>
				</form> 
			{/if}
	{/if}
		
	<form action="" method="post" id="thisform">		
		{$hidden_token_profile_change}
	{if $UseAvatars neq false}
			{#PLIGG_Visual_Profile_CurrentAvatar#}
			<span id="ls_avatar-large"><img src="{$Avatar_ImgLarge}" alt="Avatar"/></span>
			<span id="ls_avatar-small"><img src="{$Avatar_ImgSmall}" alt="Avatar"/></span>
			<br />
			<input type="radio" onclick="document.getElementById('imgsavebut').click()" name="avatarsource" value="" {if $user_avatar_source eq ""}CHECKED{/if}>&nbsp;{#PLIGG_Visual_Profile_UseDefaultAvatar#}<br />
			<input type="radio" onclick="document.getElementById('imgsavebut').click()" name="avatarsource" value="useruploaded" {if $user_avatar_source eq "useruploaded"}CHECKED{/if}>&nbsp;{#PLIGG_Visual_Profile_UploadAvatar#}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<input type=submit id="imgsavebut" name="save_profile" value="{#PLIGG_Visual_Profile_Save#}" class="log2" style="display:none">				
			
		</fieldset>		
	{/if}

{literal}
	<style type="text/css">
		.eip_editable { background-color: #ff9; padding: 3px; }
		.eip_savebutton { background-color: #36f; color: #fff; }
		.eip_cancelbutton { background-color: #000; color: #fff; }
		.eip_saving { background-color: #903; color: #fff; padding: 3px; }
		.eip_empty { color: #afafaf; }
			
	</style>
{/literal}

<a id="setsite"></a>
<div id = "sitemanager" >
<fieldset {if $user_first_time eq 'true'}style="display:none"{/if}><legend>设置网址</legend>
<table style="border:none; width:auto;">
	<tr style="border:none;">
		<td>网址描述</td>
		<td>URL</td>
	</tr>
	<tr style="border:none;">
		<td><input type="text" name="site-title" id="site-title" class="form-text"  style="color: #9A9A9A"value="如：我的博客" onfocus="if (this.value == '如：我的博客') this.style.color='#000000'; if (this.value == '如：我的博客') this.value=''" onblur="if (this.value == '') this.style.color='#9A9A9A'; if (this.value == '') this.value='如：我的博客'"/></td>
		<td><input type="text" name="site-url" id="site-url" class="form-text" value="http://"/></td>
		<td><input type="button" onclick="this.form.addsite.value='true';this.form.submit()"  value="添加"/></td>
		<td><input type="hidden" name="addsite" id="addsite" value="false"</td>
	</tr>
	{section name=thesite loop=$site_array start=0}
	<tr style="border:none;">
		<td>{$site_array[thesite].site_title}</td>
		<td><a href="{$site_array[thesite].site_url}" target="_blank">{$site_array[thesite].site_url}</a></td>
		<td><a href = "profile.php?action=remove&item=site&id={$site_array[thesite].site_id}"  onclick="return confirm('您确定要删除这个网址吗')">删除</a></td>
	</tr>
	{/section}
</table>
</fieldset>
</div>

<a id="setrss"></a>
<div id = "rssmanager" >
<fieldset {if $user_first_time eq 'true'}style="display:none"{/if}><legend>设置订阅（RSS）</legend>
<table style="border:none; width:auto;">
	<tr style="border:none;">
		<td>订阅（RSS）描述</td>
		<td>URL</td>
	</tr>
	<tr style="border:none;">
		<td><input type="text" name="rss-title" id="rss-title" class="form-text"  style="color: #9A9A9A"value="如：我的订阅" onfocus="if (this.value == '如：我的订阅') this.style.color='#000000'; if (this.value == '如：我的订阅') this.value=''" onblur="if (this.value == '') this.style.color='#9A9A9A'; if (this.value == '') this.value='如：我的订阅'"/></td>
		<td><input type="text" name="rss-url" id="rss-url" class="form-text" value="http://"/></td>
		<td><input type="button" onclick="this.form.addrss.value='true';this.form.submit()"  value="添加"/></td>
		<td><input type="hidden" name="addrss" id="addrss" value="false"</td>
	</tr>
	{section name=therss loop=$rss_array start=0}
	<tr style="border:none;">
		<td>{$rss_array[therss].rss_title}</td>
		<td><a href="{$rss_array[therss].rss_url}" target="_blank">{$rss_array[therss].rss_url}</a></td>
		<td><a href = "profile.php?action=remove&item=rss&id={$rss_array[therss].rss_id}"  onclick="return confirm('您确定要删除这个订阅吗')">删除</a></td>
	</tr>
	{/section}
</table>
</fieldset>
</div>

<a id="setintro"></a>
<fieldset {if $user_first_time eq 'true'}style="display:none"{/if}><legend>编写小传</legend>
	<br>
	<textarea name="desc" rows="15" cols="68" id="desc" WRAP=SOFT>{$user_desc}</textarea>
	<br><br/>
	<input type="submit" name="save_profile" value="{#PLIGG_Visual_Profile_Save#}" class="log2" >
</fieldset>

<a id="setotherinfo"></a>
<fieldset {if $user_first_time eq 'true'}style="display:none"{/if}><legend>设置其他个性信息</legend>
<table style="border:none">

	{checkActionsTpl location="tpl_profile_center_fields"}

	<tr>
		<td width="30%">
			<label for="name" accesskey="1">{#PLIGG_Visual_Profile_RealName#}</label>
			<input type="text" name="names" id="names" value="{$user_names}">
		</td>
		<td>
			<label for="name" accesskey="1">{#PLIGG_Visual_Profile_Email#}</label>
			<input type="text" name="email" id="email" value="{$user_email}" onkeyup="if(this.form.emailcheckbox.checked == true) {ldelim}this.form.public_email.value = this.form.email.value;{rdelim}"> 
		</td>
		<td>
			<label> &nbsp;&nbsp; </label>
			{if $user_email eq $user_publicemail}
				<em><input type="checkbox" checked=1 name="emailcheckbox" id="emailcheckbox" onclick="if(this.form.emailcheckbox.checked == true) {ldelim}this.form.public_email.value = this.form.email.value;{rdelim} else {ldelim}this.form.public_email.value = '';{rdelim}">这是公开的邮箱</em>
			{else}
				<em><input type="checkbox"  name="emailcheckbox" id="emailcheckbox" onclick="if(this.form.emailcheckbox.checked == true) {ldelim}this.form.public_email.value = this.form.email.value;{rdelim} else {ldelim}this.form.public_email.value = '';{rdelim}">这是公开的邮箱</em>
			{/if}
		</td>
	</tr>
	<tr>
		<td>
			<label for="name" accesskey="1">{#PLIGG_Visual_Profile_Location#}</label>
			<input type="text" name="location" id="location" value="{$user_location}">
		</td>
		<td>
			<label for="name" accesskey="1">{#PLIGG_Visual_Profile_Occupation#}</label>
			<input type="text" name="occupation" id="occupation" value="{$user_occupation}">
		</td>
		<td></td>
	</tr>
	<tr>
		<td>
			<label for="name" accesskey="1">{#PLIGG_Visual_User_Profile_MSN#}</label>
			<input type="text" name="msn" id="msn" value="{$user_msn}">
		</td>
		<td>
			<label for="name" accesskey="1">{#PLIGG_Visual_User_Profile_AIM#}</label>
			<input type="text" name="aim" id="aim" value="{$user_aim}">
		</td>
		<td>
			<label for="name" accesskey="1">{#PLIGG_Visual_User_Profile_GTalk#}</label>
			<input type="text" name="gtalk" id="gtalk" value="{$user_gtalk}">
		</td>
	</tr>

	<tr>
		<td>
			<label for="name" accesskey="1">{#PLIGG_Visual_User_Profile_Skype#}</label>
			<input type="text" name="skype" id="skype" value="{$user_skype}">
		</td>
		<td>
			<label for="name" accesskey="1">{#PLIGG_Visual_User_Profile_Yahoo#}</label>
			<input type="text" name="yahoo" id="yahoo" value="{$user_yahoo}">
		</td>
		<td>
		</td>	
	</tr>
	<tr>
		<td>
		<input type="radio" onclick="document.getElementById('trackbackout').value='true'" name="settrackbackout" value="true" {if $trackbackout eq "true"}CHECKED{/if}>接收推荐和评论提醒邮件<br />
		</td>
		<td>
		<input type="radio" onclick="document.getElementById('trackbackout').value='false'" name="settrackbackout" value="false" {if $trackbackout eq "false"}CHECKED{/if}>不接收推荐和评论提醒邮件&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		</td>		
	</tr>
</table>
<input type="hidden" name="trackbackout" id="trackbackout" value="{$trackbackout}" />
<br><p> 
<input type="submit" name="save_profile" value="{#PLIGG_Visual_Profile_Save#}" class="log2" ></p>
</fieldset>		

<a id='changepwd'></a>
<fieldset {if $user_first_time eq 'true'}style="display:none"{/if}><legend>修改密码</legend>
<span style="color:#ccc">修改密码后请用新密码重新登录</span>
<table style="border:none">
	<tr>
		<td colspan = 2>
			<label for="password">{#PLIGG_Visual_Profile_OldPass#}:</label>
			<input type="password" id="oldpassword" name="oldpassword" size="25" />
		</td>
	</tr>

	<tr>
		<td width="30%">
			<label for="password">{#PLIGG_Visual_Profile_NewPass#}:</label>
			<input type="password" id="newpassword" name="newpassword" size="25" />
		</td>
		<td>
			<label for="verify">{#PLIGG_Visual_Profile_VerifyNewPass#}: </label>
			<input type="password" id="verify" name="newpassword2" size="25" />
		</td>
	</tr>

	<input type="hidden" name="process" value="1">
	<input type="hidden" name="user_id" value="{$user_id}">	
</table>
	
<br />
<input type="submit" name="save_profile" value="{#PLIGG_Visual_Profile_Save#}" class="log2" >
</fieldset>

{if $user_first_time == 'true'}
<a id="changeloginname"></a>
<fieldset><legend>修改用户名</legend>
<span style="color:#ccc">修改用户名后请用新用户名重新登录</span>
	<label>新用户名:</label>	
	<input onblur="checkfield('username', this.form, this.form.user_login)" type="text" name="user_login" id="user_login" size="25" maxlength="32" value="{$newusername}"/>
	<span id="user_logincheckitvalue" style="color:red"></span>
	<input type="submit" name="save_profile" value="{#PLIGG_Visual_Profile_Save#}" class="log2" >
</fieldset>
{/if}

<input type="hidden" name="public_email" id="public_email" value="{$user_publicemail}">
<input type="hidden" name="first_time" id="first_time" value="{$user_first_time}">
<input type="hidden" name="url" id="url"  value="{$user_url}">
<input type="hidden" name="irc" id="irc"  value="{$user_irc}">
</form>
</fieldset>
